<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>BadgerDB: /home/ubuntu/study/dbmslab/lab2/BufMgr/src/types.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">BadgerDB
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_43e0a1f539e00dcfa1a6bc4d4fee4fc2.html">home</a></li><li class="navelem"><a class="el" href="dir_f895279abf3c9abddbac24b9a320b4c6.html">ubuntu</a></li><li class="navelem"><a class="el" href="dir_9223221a80e1dde112a2f0d1c0d6bc8d.html">study</a></li><li class="navelem"><a class="el" href="dir_565d95caf30f979632cef261ad9a6ed4.html">dbmslab</a></li><li class="navelem"><a class="el" href="dir_04bc7b587b42191e49c8f970037360ad.html">lab2</a></li><li class="navelem"><a class="el" href="dir_ccc57109e70d5b9b219c75d9ecb5bc70.html">BufMgr</a></li><li class="navelem"><a class="el" href="dir_57419356550b183f8cb4d89f81ab51b6.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">types.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160; </div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacebadgerdb.html">badgerdb</a> {</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">   15</a></span>&#160;<span class="keyword">typedef</span> std::uint32_t <a class="code" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a>;</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">   20</a></span>&#160;<span class="keyword">typedef</span> std::uint16_t <a class="code" href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">SlotId</a>;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="namespacebadgerdb.html#a1e7378fbefaea050a47e6cde929e9c01">   25</a></span>&#160;<span class="keyword">typedef</span> std::uint32_t <a class="code" href="namespacebadgerdb.html#a1e7378fbefaea050a47e6cde929e9c01">FrameId</a>;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="structbadgerdb_1_1_record_id.html">   30</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structbadgerdb_1_1_record_id.html">RecordId</a> {</div>
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="structbadgerdb_1_1_record_id.html#aca5e770e2726e51efed3a47c6457cd94">   34</a></span>&#160;  <a class="code" href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">PageId</a> <a class="code" href="structbadgerdb_1_1_record_id.html#aca5e770e2726e51efed3a47c6457cd94">page_number</a>;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="structbadgerdb_1_1_record_id.html#a19ec7b749099499446fdd24d48cec9ef">   39</a></span>&#160;  <a class="code" href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">SlotId</a> <a class="code" href="structbadgerdb_1_1_record_id.html#a19ec7b749099499446fdd24d48cec9ef">slot_number</a>;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="structbadgerdb_1_1_record_id.html#a8558089af839ce3b345ab026a8fb1463">   47</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="structbadgerdb_1_1_record_id.html#a8558089af839ce3b345ab026a8fb1463">operator==</a>(<span class="keyword">const</span> <a class="code" href="structbadgerdb_1_1_record_id.html">RecordId</a>&amp; rhs)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structbadgerdb_1_1_record_id.html#aca5e770e2726e51efed3a47c6457cd94">page_number</a> == rhs.<a class="code" href="structbadgerdb_1_1_record_id.html#aca5e770e2726e51efed3a47c6457cd94">page_number</a> &amp;&amp; <a class="code" href="structbadgerdb_1_1_record_id.html#a19ec7b749099499446fdd24d48cec9ef">slot_number</a> == rhs.<a class="code" href="structbadgerdb_1_1_record_id.html#a19ec7b749099499446fdd24d48cec9ef">slot_number</a>;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  }</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structbadgerdb_1_1_record_id.html#abef1000678efe46ff7612f35c1e41e86">   57</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="structbadgerdb_1_1_record_id.html#abef1000678efe46ff7612f35c1e41e86">operator!=</a>(<span class="keyword">const</span> <a class="code" href="structbadgerdb_1_1_record_id.html">RecordId</a>&amp; rhs)<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    <span class="keywordflow">return</span> (<a class="code" href="structbadgerdb_1_1_record_id.html#aca5e770e2726e51efed3a47c6457cd94">page_number</a> != rhs.<a class="code" href="structbadgerdb_1_1_record_id.html#aca5e770e2726e51efed3a47c6457cd94">page_number</a>) || (<a class="code" href="structbadgerdb_1_1_record_id.html#a19ec7b749099499446fdd24d48cec9ef">slot_number</a> != rhs.<a class="code" href="structbadgerdb_1_1_record_id.html#a19ec7b749099499446fdd24d48cec9ef">slot_number</a>);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  }</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;};</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;}</div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="anamespacebadgerdb_html"><div class="ttname"><a href="namespacebadgerdb.html">badgerdb</a></div><div class="ttdef"><b>Definition:</b> <a href="buffer_8cpp_source.html#l00017">buffer.cpp:17</a></div></div>
<div class="ttc" id="anamespacebadgerdb_html_a1e7378fbefaea050a47e6cde929e9c01"><div class="ttname"><a href="namespacebadgerdb.html#a1e7378fbefaea050a47e6cde929e9c01">badgerdb::FrameId</a></div><div class="ttdeci">std::uint32_t FrameId</div><div class="ttdoc">Identifier for a frame in buffer pool.</div><div class="ttdef"><b>Definition:</b> <a href="types_8h_source.html#l00025">types.h:25</a></div></div>
<div class="ttc" id="astructbadgerdb_1_1_record_id_html_a19ec7b749099499446fdd24d48cec9ef"><div class="ttname"><a href="structbadgerdb_1_1_record_id.html#a19ec7b749099499446fdd24d48cec9ef">badgerdb::RecordId::slot_number</a></div><div class="ttdeci">SlotId slot_number</div><div class="ttdef"><b>Definition:</b> <a href="types_8h_source.html#l00039">types.h:39</a></div></div>
<div class="ttc" id="astructbadgerdb_1_1_record_id_html"><div class="ttname"><a href="structbadgerdb_1_1_record_id.html">badgerdb::RecordId</a></div><div class="ttdoc">Identifier for a record in a page.</div><div class="ttdef"><b>Definition:</b> <a href="types_8h_source.html#l00030">types.h:30</a></div></div>
<div class="ttc" id="astructbadgerdb_1_1_record_id_html_aca5e770e2726e51efed3a47c6457cd94"><div class="ttname"><a href="structbadgerdb_1_1_record_id.html#aca5e770e2726e51efed3a47c6457cd94">badgerdb::RecordId::page_number</a></div><div class="ttdeci">PageId page_number</div><div class="ttdef"><b>Definition:</b> <a href="types_8h_source.html#l00034">types.h:34</a></div></div>
<div class="ttc" id="anamespacebadgerdb_html_a1f49e404293bf4240756b89b53b1587a"><div class="ttname"><a href="namespacebadgerdb.html#a1f49e404293bf4240756b89b53b1587a">badgerdb::PageId</a></div><div class="ttdeci">std::uint32_t PageId</div><div class="ttdoc">Identifier for a page in a file.</div><div class="ttdef"><b>Definition:</b> <a href="types_8h_source.html#l00015">types.h:15</a></div></div>
<div class="ttc" id="astructbadgerdb_1_1_record_id_html_a8558089af839ce3b345ab026a8fb1463"><div class="ttname"><a href="structbadgerdb_1_1_record_id.html#a8558089af839ce3b345ab026a8fb1463">badgerdb::RecordId::operator==</a></div><div class="ttdeci">bool operator==(const RecordId &amp;rhs) const</div><div class="ttdef"><b>Definition:</b> <a href="types_8h_source.html#l00047">types.h:47</a></div></div>
<div class="ttc" id="anamespacebadgerdb_html_afe9f2f985e7c67e04f76a16f7c4500c8"><div class="ttname"><a href="namespacebadgerdb.html#afe9f2f985e7c67e04f76a16f7c4500c8">badgerdb::SlotId</a></div><div class="ttdeci">std::uint16_t SlotId</div><div class="ttdoc">Identifier for a slot in a page.</div><div class="ttdef"><b>Definition:</b> <a href="types_8h_source.html#l00020">types.h:20</a></div></div>
<div class="ttc" id="astructbadgerdb_1_1_record_id_html_abef1000678efe46ff7612f35c1e41e86"><div class="ttname"><a href="structbadgerdb_1_1_record_id.html#abef1000678efe46ff7612f35c1e41e86">badgerdb::RecordId::operator!=</a></div><div class="ttdeci">bool operator!=(const RecordId &amp;rhs) const</div><div class="ttdef"><b>Definition:</b> <a href="types_8h_source.html#l00057">types.h:57</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
